package com.yqg.protection.controller.dto;

import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yqg.protection.cover.InspectionStateConverter;
import com.yqg.protection.cover.LocalDateTimeConverter;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * projectName:xf-service1
 * author:zxf
 * time:2024/10/15 11:09
 * description:
 */
@Data
public class ImportRecordInspectionDto {

    @ExcelProperty(value = "单位ID(必填)", index = 0)
    @ApiModelProperty("单位id")
    private Long clientId;

    @ExcelProperty(value = "巡检人员名称(必填)", index = 1)
    @ApiModelProperty("巡检人员名称")
    private String userName;

    @ExcelProperty(value = "巡检地址ID(必填)", index = 2)
    @ApiModelProperty("巡检地址ID")
    private Long address;

    @ExcelProperty(value = "巡检电话(必填)", index = 3)
    @ApiModelProperty("巡检电话")
    private String telephone;

    @ExcelProperty(value = "巡检时间(必填)", index = 4, converter = LocalDateTimeConverter.class)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty("巡检时间")
    private LocalDateTime dateTime;

    @ExcelProperty(value = "巡检状态(无隐患/有隐患/已排除)(必填)", index = 5, converter = InspectionStateConverter.class)
    @ApiModelProperty("巡检状态 0：无隐患 1有隐患 2已排除")
    private String state;

    @ExcelProperty(value = "巡检信息", index = 6)
    @ApiModelProperty("巡检信息")
    private String information;

    @ExcelProperty(value = "问题简述(不超过10个字)", index = 7)
    @ApiModelProperty("问题简述")
    private String hiddenDanger;

    @ExcelProperty(value = "巡检图片", index = 8)
    @ApiModelProperty("巡检图片")
    private String informationPhoto;

    @ExcelProperty(value = "检查时间", index = 9, converter = LocalDateTimeConverter.class)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty("检查时间")
    private LocalDateTime resultTime;

    @ExcelProperty(value = "检查结果", index = 10)
    @ApiModelProperty("检查结果")
    private String result;

    @ExcelProperty(value = "检查图片", index = 11)
    @ApiModelProperty("检查图片")
    private String resultPhoto;

}
